home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 7_10.lha / 7_10 / po_forget.c < prev    next >
Text File  |  1993-08-08  |  661b  |  27 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <process.h>
  6. include <debug.h>    /* DELETE */
  7. / remove a process from this object's memory
  8. oid process_object::forget(process *tp)
  9.  
  10.    if (debug) /*DELETE*/ cerr << "process_object" << this << "::forget(" << tp << ")\n";
  11.  
  12.    if (!po_link)
  13. return;
  14.  
  15.    for (process_link **lp = &po_link; *lp; )
  16. if ((*lp)->pl_process == tp)
  17.     {
  18.     process_link *sv = *lp;
  19.     *lp = sv->pl_next;
  20.     delete sv;
  21.     }
  22.  
  23. else
  24.     lp = &(*lp)->pl_next;
  25.    if (debug) /*DELETE*/ cerr << "<<<< process_object::forget(" << tp << ")\n";
  26.  
  27.